package org.esuml.ui.swing.frame;

import java.awt.Toolkit;

import javax.swing.JFrame;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class MainFrame extends JFrame implements InitializingBean { 

	/**
	 * .
	 */
	private static final long serialVersionUID = -3080414947305531191L;

	@Value("${esuml.mainFrame.title}")
	private String mainFrameTitle;
	
	public MainFrame() {
		super();
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLocation(0, 0);
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		this.setTitle(this.mainFrameTitle);
		this.setExtendedState(JFrame.MAXIMIZED_BOTH);
	}
	
}
